defmodule DbSupport.Provider do
  @type master_node :: atom
  @type table :: atom
  @type id :: any
  @type data :: tuple

  @callback init_master() :: boolean

  @callback add_self_to_cluster(master_node) :: boolean

  @callback get_data_by_id(table, id) :: tuple()

  @callback get_all(table) :: [tuple()]

  @callback create_data(table, data) :: tuple()

  @callback next_id(type :: String.t) :: pos_integer()
end
